Integrand size = 31, antiderivative size = 117 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {a (3 A+4 C) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a (2 A+3 C) \tan (c+d x)}{3 d}+\frac {a (3 A+4 C) \sec (c+d x) \tan (c+d x)}{8 d}+\frac {a A \sec ^2(c+d x) \tan (c+d x)}{3 d}+\frac {a A \sec ^3(c+d x) \tan (c+d x)}{4 d} \]
1/8*a*(3*A+4*C)*arctanh(sin(d*x+c))/d+1/3*a*(2*A+3*C)*tan(d*x+c)/d+1/8*a*( 3*A+4*C)*sec(d*x+c)*tan(d*x+c)/d+1/3*a*A*sec(d*x+c)^2*tan(d*x+c)/d+1/4*a*A *sec(d*x+c)^3*tan(d*x+c)/d
Time = 0.29 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.64 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {a \left (3 (3 A+4 C) \text {arctanh}(\sin (c+d x))+\tan (c+d x) \left (24 (A+C)+3 (3 A+4 C) \sec (c+d x)+6 A \sec ^3(c+d x)+8 A \tan ^2(c+d x)\right )\right )}{24 d} \]
(a*(3*(3*A + 4*C)*ArcTanh[Sin[c + d*x]] + Tan[c + d*x]*(24*(A + C) + 3*(3* A + 4*C)*Sec[c + d*x] + 6*A*Sec[c + d*x]^3 + 8*A*Tan[c + d*x]^2)))/(24*d)
Time = 0.75 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.03, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.387, Rules used = {3042, 3511, 3042, 3500, 3042, 3227, 3042, 4254, 24, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^5(c+d x) (a \cos (c+d x)+a) \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right ) \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^5}dx\) |
\(\Big \downarrow \) 3511 |
\(\displaystyle \frac {1}{4} \int \left (4 a C \cos ^2(c+d x)+a (3 A+4 C) \cos (c+d x)+4 a A\right ) \sec ^4(c+d x)dx+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int \frac {4 a C \sin \left (c+d x+\frac {\pi }{2}\right )^2+a (3 A+4 C) \sin \left (c+d x+\frac {\pi }{2}\right )+4 a A}{\sin \left (c+d x+\frac {\pi }{2}\right )^4}dx+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3500 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int (3 a (3 A+4 C)+4 a (2 A+3 C) \cos (c+d x)) \sec ^3(c+d x)dx+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int \frac {3 a (3 A+4 C)+4 a (2 A+3 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^3}dx+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (3 a (3 A+4 C) \int \sec ^3(c+d x)dx+4 a (2 A+3 C) \int \sec ^2(c+d x)dx\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (4 a (2 A+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+3 a (3 A+4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (3 a (3 A+4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-\frac {4 a (2 A+3 C) \int 1d(-\tan (c+d x))}{d}\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (3 a (3 A+4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {4 a (2 A+3 C) \tan (c+d x)}{d}\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (3 a (3 A+4 C) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {4 a (2 A+3 C) \tan (c+d x)}{d}\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (3 a (3 A+4 C) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {4 a (2 A+3 C) \tan (c+d x)}{d}\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (3 a (3 A+4 C) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {4 a (2 A+3 C) \tan (c+d x)}{d}\right )+\frac {4 a A \tan (c+d x) \sec ^2(c+d x)}{3 d}\right )+\frac {a A \tan (c+d x) \sec ^3(c+d x)}{4 d}\) |
(a*A*Sec[c + d*x]^3*Tan[c + d*x])/(4*d) + ((4*a*A*Sec[c + d*x]^2*Tan[c + d *x])/(3*d) + ((4*a*(2*A + 3*C)*Tan[c + d*x])/d + 3*a*(3*A + 4*C)*(ArcTanh[ Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d)))/3)/4
3.1.8.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1)* (a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*Simp[b*(a*A - b*B + a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A *b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[ (-(b*c - a*d))*(A*b^2 + a^2*C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/( b^2*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1)*(a*C*(b*c - a*d) + A*b*(a*c - b*d )) - ((b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Sin[e + f*x] + b *C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e , f, A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 8.48 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.01
method | result | size |
derivativedivides | \(\frac {-a A \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a C \tan \left (d x +c \right )+a A \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(118\) |
default | \(\frac {-a A \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+a C \tan \left (d x +c \right )+a A \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(118\) |
parts | \(\frac {a A \left (-\left (-\frac {\left (\sec ^{3}\left (d x +c \right )\right )}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}-\frac {a A \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {a C \tan \left (d x +c \right )}{d}\) | \(126\) |
parallelrisch | \(\frac {8 \left (-\frac {9 \left (A +\frac {4 C}{3}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{16}+\frac {9 \left (A +\frac {4 C}{3}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{16}+\left (A +\frac {3 C}{4}\right ) \sin \left (2 d x +2 c \right )+\frac {3 \left (\frac {3 A}{4}+C \right ) \sin \left (3 d x +3 c \right )}{8}+\frac {\left (A +\frac {3 C}{2}\right ) \sin \left (4 d x +4 c \right )}{4}+\frac {33 \left (A +\frac {4 C}{11}\right ) \sin \left (d x +c \right )}{32}\right ) a}{3 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(174\) |
norman | \(\frac {\frac {a \left (7 A -4 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {a \left (3 A +4 C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {a \left (11 A +12 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {a \left (13 A +12 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {a \left (43 A +12 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d}+\frac {a \left (73 A -84 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {a \left (89 A +60 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {a \left (3 A +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a \left (3 A +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(249\) |
risch | \(-\frac {i a \left (9 A \,{\mathrm e}^{7 i \left (d x +c \right )}+12 C \,{\mathrm e}^{7 i \left (d x +c \right )}-24 C \,{\mathrm e}^{6 i \left (d x +c \right )}+33 A \,{\mathrm e}^{5 i \left (d x +c \right )}+12 C \,{\mathrm e}^{5 i \left (d x +c \right )}-48 A \,{\mathrm e}^{4 i \left (d x +c \right )}-72 C \,{\mathrm e}^{4 i \left (d x +c \right )}-33 A \,{\mathrm e}^{3 i \left (d x +c \right )}-12 C \,{\mathrm e}^{3 i \left (d x +c \right )}-64 A \,{\mathrm e}^{2 i \left (d x +c \right )}-72 C \,{\mathrm e}^{2 i \left (d x +c \right )}-9 A \,{\mathrm e}^{i \left (d x +c \right )}-12 C \,{\mathrm e}^{i \left (d x +c \right )}-16 A -24 C \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}+\frac {3 a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}-\frac {3 a A \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}\) | \(265\) |
1/d*(-a*A*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+a*C*tan(d*x+c)+a*A*(-(-1/4*se c(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c)+tan(d*x+c)))+a*C*( 1/2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c))))
Time = 0.28 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.10 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {3 \, {\left (3 \, A + 4 \, C\right )} a \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (3 \, A + 4 \, C\right )} a \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left (2 \, A + 3 \, C\right )} a \cos \left (d x + c\right )^{3} + 3 \, {\left (3 \, A + 4 \, C\right )} a \cos \left (d x + c\right )^{2} + 8 \, A a \cos \left (d x + c\right ) + 6 \, A a\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
1/48*(3*(3*A + 4*C)*a*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(3*A + 4*C) *a*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(8*(2*A + 3*C)*a*cos(d*x + c) ^3 + 3*(3*A + 4*C)*a*cos(d*x + c)^2 + 8*A*a*cos(d*x + c) + 6*A*a)*sin(d*x + c))/(d*cos(d*x + c)^4)
Timed out. \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\text {Timed out} \]
Time = 0.22 (sec) , antiderivative size = 152, normalized size of antiderivative = 1.30 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a - 3 \, A a {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, C a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, C a \tan \left (d x + c\right )}{48 \, d} \]
1/48*(16*(tan(d*x + c)^3 + 3*tan(d*x + c))*A*a - 3*A*a*(2*(3*sin(d*x + c)^ 3 - 5*sin(d*x + c))/(sin(d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d* x + c) + 1) + 3*log(sin(d*x + c) - 1)) - 12*C*a*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 48*C*a*tan(d *x + c))/d
Time = 0.31 (sec) , antiderivative size = 188, normalized size of antiderivative = 1.61 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {3 \, {\left (3 \, A a + 4 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (3 \, A a + 4 \, C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (9 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 12 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 49 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 60 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 31 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 84 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 39 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 36 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
1/24*(3*(3*A*a + 4*C*a)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*(3*A*a + 4* C*a)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(9*A*a*tan(1/2*d*x + 1/2*c)^7 + 12*C*a*tan(1/2*d*x + 1/2*c)^7 - 49*A*a*tan(1/2*d*x + 1/2*c)^5 - 60*C*a*t an(1/2*d*x + 1/2*c)^5 + 31*A*a*tan(1/2*d*x + 1/2*c)^3 + 84*C*a*tan(1/2*d*x + 1/2*c)^3 - 39*A*a*tan(1/2*d*x + 1/2*c) - 36*C*a*tan(1/2*d*x + 1/2*c))/( tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
Time = 3.49 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.42 \[ \int (a+a \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^5(c+d x) \, dx=\frac {\left (-\frac {3\,A\,a}{4}-C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {49\,A\,a}{12}+5\,C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {31\,A\,a}{12}-7\,C\,a\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {13\,A\,a}{4}+3\,C\,a\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {a\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (3\,A+4\,C\right )}{4\,d} \]
(tan(c/2 + (d*x)/2)*((13*A*a)/4 + 3*C*a) - tan(c/2 + (d*x)/2)^7*((3*A*a)/4 + C*a) - tan(c/2 + (d*x)/2)^3*((31*A*a)/12 + 7*C*a) + tan(c/2 + (d*x)/2)^ 5*((49*A*a)/12 + 5*C*a))/(d*(6*tan(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2) ^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/2)^8 + 1)) + (a*atanh(tan(c/ 2 + (d*x)/2))*(3*A + 4*C))/(4*d)